package Year22_Month02.day0224;


import java.util.Scanner;

public class Main {
    public static void main1(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int A = (a + c) / 2;
        int B = c - A;
        int C = d - B;
        System.out.println(A + " " + B + " " + C);
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int M = sc.nextInt();
        int N = sc.nextInt();
        System.out.println(Long.toString(M,N));
    }
}
